a=input("请输入一个网址：")

import re
regex=re.compile("[a-zA-Z0-9.-_]+@(([a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9])[.])+[a-zA-Z]")
match=regex.search(a)
if match==None:
    print("illegal address")
else:
    print("legal address")